home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / untcnvrs.sit / Unit Conversion / card_5893.txt < prev    next >
Text File  |  1990-11-02  |  10KB  |  405 lines

  1. -- card: 5893 from stack: in
  2. -- bmap block id: 7608
  3. -- flags: 0000
  4. -- background id: 3044
  5. -- name: Weight
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   put empty into background field "toconvert"
  9.   put empty into background field "answer"
  10. end closeCard
  11.  
  12.  
  13.  
  14. -- part 14 (button)
  15. -- low flags: 00
  16. -- high flags: 2000
  17. -- rect: left=75 top=288 right=304 bottom=134
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 0 / 0
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: Distance
  26. ----- HyperTalk script -----
  27. on mouseUp
  28.   visual effect zoom open
  29.   go to card Distance
  30. end mouseUp
  31.  
  32.  
  33.  
  34. -- part 15 (button)
  35. -- low flags: 00
  36. -- high flags: 2000
  37. -- rect: left=75 top=306 right=323 bottom=134
  38. -- title width / last selected line: 0
  39. -- icon id / first selected line: 0 / 0
  40. -- text alignment: 1
  41. -- font id: 0
  42. -- text size: 12
  43. -- style flags: 0
  44. -- line height: 16
  45. -- part name: Volume
  46. ----- HyperTalk script -----
  47. on mouseUp
  48.   visual effect zoom open
  49.   go to card Volume
  50. end mouseUp
  51.  
  52.  
  53.  
  54. -- part 17 (button)
  55. -- low flags: 00
  56. -- high flags: 2000
  57. -- rect: left=135 top=306 right=323 bottom=194
  58. -- title width / last selected line: 0
  59. -- icon id / first selected line: 0 / 0
  60. -- text alignment: 1
  61. -- font id: 0
  62. -- text size: 12
  63. -- style flags: 0
  64. -- line height: 16
  65. -- part name: Temperature
  66. ----- HyperTalk script -----
  67. on mouseUp
  68.   visual effect zoom open
  69.   go to card temperature
  70. end mouseUp
  71.  
  72.  
  73.  
  74. -- part 16 (button)
  75. -- low flags: 00
  76. -- high flags: 2000
  77. -- rect: left=135 top=288 right=304 bottom=194
  78. -- title width / last selected line: 0
  79. -- icon id / first selected line: 0 / 0
  80. -- text alignment: 1
  81. -- font id: 0
  82. -- text size: 12
  83. -- style flags: 0
  84. -- line height: 16
  85. -- part name: Area
  86. ----- HyperTalk script -----
  87. on mouseUp
  88.   visual effect zoom open
  89.   go to card Area
  90. end mouseUp
  91.  
  92.  
  93.  
  94. -- part 22 (button)
  95. -- low flags: 00
  96. -- high flags: A003
  97. -- rect: left=282 top=49 right=76 bottom=474
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 0 / 0
  100. -- text alignment: 1
  101. -- font id: 0
  102. -- text size: 12
  103. -- style flags: 0
  104. -- line height: 16
  105. -- part name: Grams to Ounces
  106. ----- HyperTalk script -----
  107. on mouseUp
  108.   set numberformat to 0.000
  109.   put empty into background field "answer"
  110.   get first word of background field "toconvert"
  111.   put it into temp
  112.   if temp is "-" then
  113.     get second word of background field "toconvert"
  114.     divide it by -1
  115.     put it into temp
  116.   end if
  117.   put empty into background field "toconvert"
  118.   if temp is empty then
  119.     put temp && "0 Grams" into background field "toconvert"
  120.   else
  121.     put temp && " Grams" into background field "toconvert"
  122.   end if
  123.   multiply temp by 0.03527
  124.   put temp && " Ounces" into background field "answer"
  125.   put empty into temp
  126. end mouseUp
  127.  
  128.  
  129.  
  130. -- part 23 (button)
  131. -- low flags: 00
  132. -- high flags: A003
  133. -- rect: left=282 top=77 right=104 bottom=474
  134. -- title width / last selected line: 0
  135. -- icon id / first selected line: 0 / 0
  136. -- text alignment: 1
  137. -- font id: 0
  138. -- text size: 12
  139. -- style flags: 0
  140. -- line height: 16
  141. -- part name: Ounces to Grams
  142. ----- HyperTalk script -----
  143. on mouseUp
  144.   set numberformat to 0.000
  145.   put empty into background field "answer"
  146.   get first word of background field "toconvert"
  147.   put it into temp
  148.   if temp is "-" then
  149.     get second word of background field "toconvert"
  150.     divide it by -1
  151.     put it into temp
  152.   end if
  153.   put empty into background field "toconvert"
  154.   if temp is empty then
  155.     put temp && "0 Ounces" into background field "toconvert"
  156.   else
  157.     put temp && " Ounces" into background field "toconvert"
  158.   end if
  159.   multiply temp by 28.35
  160.   put temp && " Grams" into background field "answer"
  161.   put empty into temp
  162. end mouseUp
  163.  
  164.  
  165.  
  166. -- part 24 (button)
  167. -- low flags: 00
  168. -- high flags: A003
  169. -- rect: left=282 top=107 right=134 bottom=474
  170. -- title width / last selected line: 0
  171. -- icon id / first selected line: 0 / 0
  172. -- text alignment: 1
  173. -- font id: 0
  174. -- text size: 12
  175. -- style flags: 0
  176. -- line height: 16
  177. -- part name: Grams to Pounds
  178. ----- HyperTalk script -----
  179. on mouseUp
  180.   set numberformat to 0.000
  181.   put empty into background field "answer"
  182.   get first word of background field "toconvert"
  183.   put it into temp
  184.   if temp is "-" then
  185.     get second word of background field "toconvert"
  186.     divide it by -1
  187.     put it into temp
  188.   end if
  189.   put empty into background field "toconvert"
  190.   if temp is empty then
  191.     put temp && "0 Grams" into background field "toconvert"
  192.   else
  193.     put temp && " Grams" into background field "toconvert"
  194.   end if
  195.   multiply temp by 0.0022046
  196.   put temp && " Pounds" into background field "answer"
  197.   put empty into temp
  198. end mouseUp
  199.  
  200.  
  201.  
  202. -- part 25 (button)
  203. -- low flags: 00
  204. -- high flags: A003
  205. -- rect: left=282 top=135 right=162 bottom=474
  206. -- title width / last selected line: 0
  207. -- icon id / first selected line: 0 / 0
  208. -- text alignment: 1
  209. -- font id: 0
  210. -- text size: 12
  211. -- style flags: 0
  212. -- line height: 16
  213. -- part name: Pounds to Grams
  214. ----- HyperTalk script -----
  215. on mouseUp
  216.   set numberformat to 0.000
  217.   put empty into background field "answer"
  218.   get first word of background field "toconvert"
  219.   put it into temp
  220.   if temp is "-" then
  221.     get second word of background field "toconvert"
  222.     divide it by -1
  223.     put it into temp
  224.   end if
  225.   put empty into background field "toconvert"
  226.   if temp is empty then
  227.     put temp && "0 Pounds" into background field "toconvert"
  228.   else
  229.     put temp && " Pounds" into background field "toconvert"
  230.   end if
  231.   divide temp by 0.0022046
  232.   put temp && " Grams" into background field "answer"
  233.   put empty into temp
  234. end mouseUp
  235.  
  236.  
  237.  
  238. -- part 27 (button)
  239. -- low flags: 00
  240. -- high flags: A003
  241. -- rect: left=282 top=223 right=250 bottom=474
  242. -- title width / last selected line: 0
  243. -- icon id / first selected line: 0 / 0
  244. -- text alignment: 1
  245. -- font id: 0
  246. -- text size: 12
  247. -- style flags: 0
  248. -- line height: 16
  249. -- part name: Metric Ton to English Ton
  250. ----- HyperTalk script -----
  251. on mouseUp
  252.   set numberformat to 0.000
  253.   put empty into background field "answer"
  254.   get first word of background field "toconvert"
  255.   put it into temp
  256.   if temp is "-" then
  257.     get second word of background field "toconvert"
  258.     divide it by -1
  259.     put it into temp
  260.   end if
  261.   put empty into background field "toconvert"
  262.   if temp is empty then
  263.     put temp && "0 Metric Tons" into background field "toconvert"
  264.   else
  265.     put temp && " Metric Tons" into background field "toconvert"
  266.   end if
  267.   multiply temp by 0.98421
  268.   put temp && " English Tons" into background field "answer"
  269.   put empty into temp
  270. end mouseUp
  271.  
  272.  
  273.  
  274. -- part 28 (button)
  275. -- low flags: 00
  276. -- high flags: A003
  277. -- rect: left=283 top=286 right=320 bottom=475
  278. -- title width / last selected line: 0
  279. -- icon id / first selected line: 0 / 0
  280. -- text alignment: 1
  281. -- font id: 0
  282. -- text size: 12
  283. -- style flags: 0
  284. -- line height: 16
  285. -- part name: Additional Notes
  286. ----- HyperTalk script -----
  287. on mouseUp
  288.   visual effect zoom open
  289.   go to card addinfo
  290. end mouseUp
  291.  
  292.  
  293.  
  294. -- part 30 (button)
  295. -- low flags: 00
  296. -- high flags: A003
  297. -- rect: left=282 top=251 right=278 bottom=474
  298. -- title width / last selected line: 0
  299. -- icon id / first selected line: 0 / 0
  300. -- text alignment: 1
  301. -- font id: 0
  302. -- text size: 12
  303. -- style flags: 0
  304. -- line height: 16
  305. -- part name: English Ton to Metric Ton
  306. ----- HyperTalk script -----
  307. on mouseUp
  308.   set numberformat to 0.000
  309.   put empty into background field "answer"
  310.   get first word of background field "toconvert"
  311.   put it into temp
  312.   if temp is "-" then
  313.     get second word of background field "toconvert"
  314.     divide it by -1
  315.     put it into temp
  316.   end if
  317.   put empty into background field "toconvert"
  318.   if temp is empty then
  319.     put temp && "0 English Tons" into background field "toconvert"
  320.   else
  321.     put temp && " English Tons" into background field "toconvert"
  322.   end if
  323.   multiply temp by 1.016
  324.   put temp && " Metric Tons" into background field "answer"
  325.   put empty into temp
  326. end mouseUp
  327.  
  328.  
  329.  
  330. -- part 31 (button)
  331. -- low flags: 00
  332. -- high flags: A003
  333. -- rect: left=281 top=165 right=192 bottom=473
  334. -- title width / last selected line: 0
  335. -- icon id / first selected line: 0 / 0
  336. -- text alignment: 1
  337. -- font id: 0
  338. -- text size: 12
  339. -- style flags: 0
  340. -- line height: 16
  341. -- part name: Kilograms to Pounds
  342. ----- HyperTalk script -----
  343. on mouseUp
  344.   set numberformat to 0.000
  345.   put empty into background field "answer"
  346.   get first word of background field "toconvert"
  347.   put it into temp
  348.   if temp is "-" then
  349.     get second word of background field "toconvert"
  350.     divide it by -1
  351.     put it into temp
  352.   end if
  353.   put empty into background field "toconvert"
  354.   if temp is empty then
  355.     put temp && "0 Kilograms" into background field "toconvert"
  356.   else
  357.     put temp && " Kilograms" into background field "toconvert"
  358.   end if
  359.   multiply temp by 2.2046
  360.   put temp && " Pounds" into background field "answer"
  361.   put empty into temp
  362. end mouseUp
  363.  
  364.  
  365.  
  366. -- part 32 (button)
  367. -- low flags: 00
  368. -- high flags: A003
  369. -- rect: left=282 top=193 right=220 bottom=474
  370. -- title width / last selected line: 0
  371. -- icon id / first selected line: 0 / 0
  372. -- text alignment: 1
  373. -- font id: 0
  374. -- text size: 12
  375. -- style flags: 0
  376. -- line height: 16
  377. -- part name: Pounds to Kilograms
  378. ----- HyperTalk script -----
  379. on mouseUp
  380.   set numberformat to 0.000
  381.   put empty into background field "answer"
  382.   get first word of background field "toconvert"
  383.   put it into temp
  384.   if temp is "-" then
  385.     get second word of background field "toconvert"
  386.     divide it by -1
  387.     put it into temp
  388.   end if
  389.   put empty into background field "toconvert"
  390.   if temp is empty then
  391.     put temp && "0 Pounds" into background field "toconvert"
  392.   else
  393.     put temp && " Pounds" into background field "toconvert"
  394.   end if
  395.   divide temp by 2.2046
  396.   put temp && " Kilograms" into background field "answer"
  397.   put empty into temp
  398. end mouseUp
  399.  
  400.  
  401.  
  402. -- part contents for background part 7
  403. ----- text -----
  404. Weight
  405. Conversions